#ifndef PRISM_RESOLVE_TYPE_HPP
#define PRISM_RESOLVE_TYPE_HPP
//=====================================================================
#include <atma/assert.hpp>
//=====================================================================
#include <sooty/frontend/syntactic_analysis/parseme.hpp>
#include <sooty/frontend/syntactic_analysis/algorithm.hpp>
//=====================================================================
#include <prism/frontend/syntactical_analysis/parse.hpp>
//=====================================================================
namespace prism {
namespace resolve {
//=====================================================================

	//=====================================================================
	// returns the node that is the type of the given thing. identifiers
	// go to variable-definitions, int-literals go to int-types, etc
	//=====================================================================
	struct type_of_pred {
		type_of_pred(sooty::const_parseme_ptr_ref N);
		sooty::parseme_ptr operator ()() const;
	private:
		sooty::parseme_ptr N;
	};


	//=====================================================================
	// true if the types (assumed to be defining a type) match. both versions.
	//=====================================================================
	struct type_matches_pred {
		type_matches_pred(sooty::const_parseme_ptr_ref lhs);
		bool operator ()(sooty::const_parseme_ptr_ref rhs) const;
	private:
		sooty::parseme_ptr lhs;
	};
	

	//=====================================================================
	// binary version of the above
	//=====================================================================
	struct types_match_pred {
		bool operator ()(sooty::const_parseme_ptr_ref lhs, sooty::const_parseme_ptr_ref rhs) const;
	};
	
	
//=====================================================================
} // namespace resolve
} // namespace prism
//=====================================================================
#endif
//=====================================================================
